home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 981 b | 39 lines | [TEXT/ToyS] |
- property kasView : 0
-
-
- on run
- ShowAlert("Drop 1 folder/disk on this Applet to preserve its View for future application.")
- end run
-
-
- on open fsObjs
- if the number of items in fsObjs is 1 then
- if AskUser("Do you wish to apply the current view to this item or save its view for future application?", ¬
- {"Save", "Apply"}) is "Save" then
- set kasView to (finder view setting of (basic info for (item 1 of fsObjs)))
- return
- end if
- end if
-
- -- Get our icon
- repeat with fsObj in fsObjs
- set fsInfo to basic info for fsObj
- set the finder view setting of fsInfo to kasView
- set the catalog info of fsObj to fsInfo
- tell application "Finder" to update fsObj
- end repeat
- end open
-
-
- on ShowAlert(msgStr)
- display dialog msgStr buttons {"Yo!"} ¬
- default button 1 with icon stop
- end ShowAlert
-
-
- on AskUser(question, choices)
- return button returned of ¬
- (display dialog question buttons choices ¬
- default button (number of items in choices) with icon note)
- end AskUser
-